home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / programm.ing / falcon / nt_dsp1.lzh / NT_DSP1.MSA / FLTS / FIRT.ASM < prev    next >
Encoding:
Assembly Source File  |  1989-01-24  |  1.2 KB  |  42 lines

  1. ;
  2. ; This program originally available on the Motorola DSP bulletin board.
  3. ; It is provided under a DISCLAIMER OF WARRANTY available from
  4. ; Motorola DSP Operation, 6501 Wm. Cannon Drive W., Austin, Tx., 78735.
  5. ; Last Update 16 Jul 87   Version 1.0
  6. ;
  7. ;
  8. ;       FIR test program
  9. ;
  10.         opt     cex,mex
  11.         page    132,66,0,10
  12.         include 'fir'
  13.  
  14. datin   equ     $ffff           ;location in Y memory of input file
  15. datout  equ     $fffe           ;location in Y memory of output file
  16. npts    equ     20              ;number of points to process
  17. ntaps   equ     4               ;number of taps in filter
  18.  
  19.         org     x:0
  20. states  dsm     ntaps           ;filter states
  21.  
  22.         org     y:0
  23. coef    dc      .1,.3,-.1,.2    ;coefficients
  24.  
  25.         org     p:$100
  26. start
  27.         move    #states,r0      ;point to filter states
  28.         move    #ntaps-1,m0     ;mod(ntaps)
  29.         move    #coef,r4        ;point to filter coefficients
  30.         move    #ntaps-1,m4     ;mod(ntaps)
  31.  
  32.         do      #npts,_endp
  33.  
  34.         movep   y:datin,x0      ;get sample
  35.  
  36.         fir     ntaps           ;do fir
  37.  
  38.         movep   a,y:datout      ;output sample
  39. _endp
  40.         end
  41.